<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>DIBA BLOG</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta property="og:type" content="website">
<meta property="og:title" content="DIBA BLOG">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="DIBA BLOG">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="DIBA BLOG">
  
    <link rel="alternate" href="/atom.xml" title="DIBA BLOG" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
  

</head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">DIBA BLOG</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main">
  
    <article id="post-mysql" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2018/04/27/mysql/" class="article-date">
  <time datetime="2018-04-27T10:06:24.000Z" itemprop="datePublished">2018-04-27</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2018/04/27/mysql/">mysql</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="what型语言：SQL三种类型"><a href="#what型语言：SQL三种类型" class="headerlink" title="what型语言：SQL三种类型"></a>what型语言：SQL三种类型</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">数据操作语言：DML is Data Manipulation Language statements.  SQL中处理数据等操作统称为数据操纵语言 增删改查</div><div class="line">数据定义语言：DDL is Data Definition Language statements.  用于定义和管理SQL 数据库中的所有对象的语言</div><div class="line">            (建设者的角度,建表,建库,建视图 等等, 15%)</div><div class="line">数据控制语言: DCL is Data Control Language statements.  用来授予或回收访问数据库的某种特权，并控制数据库操纵事务发生的时间及效果，</div><div class="line">            对数据库实行监视等(管理员角度,DBA[数据库管理员],5%) 这个用户是否有权限建表,等</div></pre></td></tr></table></figure>
<h2 id="子查询"><a href="#子查询" class="headerlink" title="子查询"></a>子查询</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">where型子查询：select goods_id,goods_name from goods where goods_id=(select max(goods_id) from goods);</div><div class="line">from型子查询：select goods_id,goods_name,cat_id from (select goods_id,cat_id,goods_name from goods</div><div class="line">            order by cat_id asc,goods_id desc) as tmp group by cat_id</div><div class="line">exist型子查询：select * from category where exists (select * from goods where category.cat_id=goods.cat_id);</div></pre></td></tr></table></figure>
<h2 id="dd"><a href="#dd" class="headerlink" title="dd"></a>dd</h2>
      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2018/04/27/mysql/" data-id="cjhbd4kpg0001wchneg8pjq25" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
</article>


  
    <article id="post-git-hexo-command" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2017/08/18/git-hexo-command/" class="article-date">
  <time datetime="2017-08-18T03:00:25.000Z" itemprop="datePublished">2017-08-18</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2017/08/18/git-hexo-command/">git+hexo命令</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="hexo常用命令"><a href="#hexo常用命令" class="headerlink" title="hexo常用命令"></a>hexo常用命令</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line">hexo new&quot;postName&quot; #新建文章</div><div class="line">hexo new page&quot;pageName&quot; #新建页面</div><div class="line">hexo generate #生成静态页面至public目录</div><div class="line">hexo server #开启预览访问端口（默认端口4000，&apos;ctrl + c&apos;关闭server）</div><div class="line">hexo deploy #将.deploy目录部署到GitHub</div><div class="line">hexo help # 查看帮助</div><div class="line">hexo version #查看Hexo的版本</div></pre></td></tr></table></figure>
<h2 id="git命令"><a href="#git命令" class="headerlink" title="git命令"></a>git命令</h2><p>在你用git之前,要先报家门,否则代码不能提交<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">$ git config --global user.name diba</div><div class="line">$ git config --global user.email dba.li@163.com</div></pre></td></tr></table></figure></p>
<p>创建版本库<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">$ cd E:/</div><div class="line">$ mkdir test</div><div class="line">$ git init</div></pre></td></tr></table></figure></p>
        
          <p class="article-more-link">
            <a href="/2017/08/18/git-hexo-command/#more">Read More</a>
          </p>
        
      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2017/08/18/git-hexo-command/" data-id="cjhbd4kp90000wchniwaamh7p" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
</article>


  
    <article id="post-diba" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2017/08/17/diba/" class="article-date">
  <time datetime="2017-08-17T02:14:54.000Z" itemprop="datePublished">2017-08-17</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2017/08/17/diba/">HEXO FIRST DAY</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="Study-now"><a href="#Study-now" class="headerlink" title="Study now"></a><a href="http://www.jianshu.com/p/1e402922ee32/" target="_blank" rel="external">Study now</a></h2><p><img src="https://timgsa.baidu.com/timg?image&amp;quality=80&amp;size=b9999_10000&amp;sec=1502963667323&amp;di=a5a4f89fae8f0599141532d8812dabcd&amp;imgtype=0&amp;src=http%3A%2F%2Fzh.mweb.im%2Fasset%2Fmweb%2Fcn%2F1-5.jpg" alt="TU"></p>
<h3 id="markdown-语法"><a href="#markdown-语法" class="headerlink" title="markdown 语法"></a>markdown 语法</h3><hr>
<h3 id="一-粗体"><a href="#一-粗体" class="headerlink" title="一 粗体"></a>一 粗体</h3><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="strong">**粗体**</span></div></pre></td></tr></table></figure>
<h3 id="二-斜体"><a href="#二-斜体" class="headerlink" title="二 斜体"></a>二 <em>斜体</em></h3><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="emphasis">*斜体*</span></div></pre></td></tr></table></figure>
<h3 id="三-无序列表"><a href="#三-无序列表" class="headerlink" title="三 无序列表"></a>三 无序列表</h3><ul>
<li>line 1</li>
<li>line 2</li>
<li>line 3</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">- 无序列表</div><div class="line">- line 1</div><div class="line">- line 2</div><div class="line">- line 3</div></pre></td></tr></table></figure>
<h3 id="四-有序列表"><a href="#四-有序列表" class="headerlink" title="四 有序列表"></a>四 有序列表</h3><ol>
<li>line 1</li>
<li>line 2</li>
<li>line 3</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">1. line 1</div><div class="line">2. line 2</div><div class="line">3. line 3</div></pre></td></tr></table></figure>
<h3 id="五-表格"><a href="#五-表格" class="headerlink" title="五 表格"></a>五 表格</h3><table>
<thead>
<tr>
<th style="text-align:left">name</th>
<th style="text-align:center">sex</th>
<th style="text-align:right">age</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">Lucy</td>
<td style="text-align:center">women</td>
<td style="text-align:right">6</td>
</tr>
<tr>
<td style="text-align:left">Tommy</td>
<td style="text-align:center">men</td>
<td style="text-align:right">30</td>
</tr>
</tbody>
</table>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">| name | sex | age |</div><div class="line">|:-----|:---:|----:|</div><div class="line">|Lucy  |women|6    |</div><div class="line">|Tommy |men  |30   |</div></pre></td></tr></table></figure>
<h3 id="六-引用"><a href="#六-引用" class="headerlink" title="六 引用"></a>六 引用</h3><blockquote>
<p>FROM Anthony</p>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">&gt; FROM Anthony</div></pre></td></tr></table></figure>
<h3 id="七-标题（1-6）"><a href="#七-标题（1-6）" class="headerlink" title="七 标题（1-6）"></a>七 标题（1-6）</h3><h1 id="diba"><a href="#diba" class="headerlink" title="diba"></a>diba</h1><h2 id="diba-1"><a href="#diba-1" class="headerlink" title="diba"></a>diba</h2><h3 id="diba-2"><a href="#diba-2" class="headerlink" title="diba"></a>diba</h3><h4 id="diba-3"><a href="#diba-3" class="headerlink" title="diba"></a>diba</h4><h5 id="diba-4"><a href="#diba-4" class="headerlink" title="diba"></a>diba</h5><h6 id="diba-5"><a href="#diba-5" class="headerlink" title="diba"></a>diba</h6><h3 id="八-超链接"><a href="#八-超链接" class="headerlink" title="八 超链接"></a>八 超链接</h3><h4 id="Anthony-blog"><a href="#Anthony-blog" class="headerlink" title="Anthony blog"></a><a href="http://www.imsry.cn" target="_blank" rel="external">Anthony blog</a></h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">[Anthony blog](http://www.imsry.cn)</div></pre></td></tr></table></figure>
<h3 id="九-图片超链接"><a href="#九-图片超链接" class="headerlink" title="九 图片超链接"></a>九 图片超链接</h3><p><strong>没错，下面是图片：</strong><br><img src="https://timgsa.baidu.com/timg?image&amp;quality=80&amp;size=b9999_10000&amp;sec=1502964830850&amp;di=25890fa68e19544d9348d06db28cfba8&amp;imgtype=0&amp;src=http%3A%2F%2Fwww.uqidong.com%2Fuploads%2Forsoon%2F20160516031338507.gif" alt="TU"></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">![TU](https://timgsa.baidu.com/timg?image&amp;quality=80&amp;size=b9999_10000&amp;sec=1502964830850&amp;di=25890fa68e19544d9348d06db28cfba8&amp;imgtype=0&amp;src=http%3A%2F%2Fwww.uqidong.com%2Fuploads%2Forsoon%2F20160516031338507.gif)</div></pre></td></tr></table></figure>
<h3 id="十-分割线"><a href="#十-分割线" class="headerlink" title="十 分割线"></a>十 分割线</h3><hr>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">***</div></pre></td></tr></table></figure>
<blockquote>
<p>完结</p>
<pre><code>谢谢支持
</code></pre></blockquote>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2017/08/17/diba/" data-id="cjhbd4kpj0002wchn627t3676" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
</article>


  
    <article id="post-hello-world" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2017/08/16/hello-world/" class="article-date">
  <time datetime="2017-08-16T07:22:04.209Z" itemprop="datePublished">2017-08-16</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2017/08/16/hello-world/">Hello World</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>Welcome to <a href="https://hexo.io/" target="_blank" rel="external">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="external">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="external">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="external">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo new <span class="string">"My New Post"</span></div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="external">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo server</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="external">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo generate</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="external">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo deploy</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="external">Deployment</a></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2017/08/16/hello-world/" data-id="cjhbd4kpm0003wchnxws8vedn" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
</article>


  

</section>
        
          <aside id="sidebar">
  
    

  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/04/">April 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/08/">August 2017</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2018/04/27/mysql/">mysql</a>
          </li>
        
          <li>
            <a href="/2017/08/18/git-hexo-command/">git+hexo命令</a>
          </li>
        
          <li>
            <a href="/2017/08/17/diba/">HEXO FIRST DAY</a>
          </li>
        
          <li>
            <a href="/2017/08/16/hello-world/">Hello World</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2018 Diba Li<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>

  </div>
</body>
</html>